<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<link href="<?php echo $this->baseUrl;?>/admincss/style.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="<?php echo $this->baseUrl;?>/adminjs/jquery.pack.js" /></script>
<script language="javascript" type="text/javascript">
function typeChange(obj)
{
	var type = obj.value;
	if (type == 2 || type == 3){
		$('._jdata').show();
	}else{
		$('._jdata').hide();
	}
}

$(function (){
	typeChange($('#type')[0]);
});
</script>
<body>
<form id="form1" name="form1" method="post" enctype="multipart/form-data" action="<?php echo $this->url ($this->baseUrl, "dict", "doedit", "", "admin");?>">
<input type="hidden" name="did" value="<?php echo $this->content['did'];?>" />
<input type="hidden" name="nowp" value="<?php echo $this->nowp;?>" />
  <table width="100%" border="1" class="tableA" >
    <tr>
      <td colspan="3" align="center">编辑数据字典</td>
    </tr>
    <tr>
      <td width="14%" nowrap>字段名称（中文）</td>
      <td width="26%"><input name="key" type="text" size="50" value="<?php echo $this->content['key'];?>" /></td>
      <td width="60%">&nbsp;</td>
    </tr>
    <tr>
      <td width="14%">字段名称（英文）</td>
      <td width="26%"><input name="enkey" type="text" size="50" value="<?php echo $this->content['enkey'];?>"/></td>
      <td width="60%">&nbsp;</td>
    </tr>
    <tr>
      <td width="14%">字段类型</td>
      <td width="26%">
      <select name="type" id="type" onchange="javascript:return typeChange(this);">
      <option value="1" <?php if ($this->content['type'] == 1){?>selected="selected"<?php }?>>文本框</option>
      <option value="2" <?php if ($this->content['type'] == 2){?>selected="selected"<?php }?>>单选</option>
      <option value="3" <?php if ($this->content['type'] == 3){?>selected="selected"<?php }?>>下拉列表</option>
      <option value="4" <?php if ($this->content['type'] == 4){?>selected="selected"<?php }?>>邮件地址</option>
      <option value="5" <?php if ($this->content['type'] == 5){?>selected="selected"<?php }?>>日期类型</option>
      <option value="6" <?php if ($this->content['type'] == 6){?>selected="selected"<?php }?>>多行文本框</option>
      </select></td>
      <td width="60%">&nbsp;</td>
    </tr>
    <tr class="_jdata" style="display:none">
      <td width="14%">字段数据（中文）</td>
      <td width="26%"><textarea name="data" cols="50" rows="5"><?php echo $this->content['data'];?></textarea></td>
      <td width="60%">一行一个</td>
    </tr>
    <tr class="_jdata" style="display:none">
      <td width="14%">字段数据（英文）</td>
      <td width="26%"><textarea name="endata" cols="50" rows="5"><?php echo $this->content['endata'];?></textarea></td>
      <td width="60%">一行一个</td>
    </tr>
    <tr>
      <td width="14%">是否必填项</td>
      <td width="26%"><input type="checkbox" value="1" name="ismust" <?php if ($this->content['ismust'] == 1){?>checked="checked"<?php }?>/><label for="ismust">必填</label></td>
      <td width="60%"></td>
    </tr>
    <tr>
      <td width="14%">是否独占一行</td>
      <td width="26%"><input type="checkbox" value="1" name="isoneline" id="isoneline" <?php if ($this->content['isoneline'] == 1){?>checked="checked"<?php }?>/><label for="isoneline">独占一行(显示时使用)</label></td>
      <td width="60%"></td>
    </tr>
    <tr>
      <td>排序</td>
      <td><input name="seq" type="text" id="seq" value="<?php echo $this->content['seq'];?>" size="10" /></td>
      <td>从大到小排序</td>
    </tr>
    <tr>
      <td colspan="3" align="center"><input type="submit" name="button" id="button" value="提交" class="btn_submit"/></td>
    </tr>
  </table>
</form>
</body>
</html>